package com.song.studylineserver.controller;

import com.song.studylineserver.domain.Exam;
import com.song.studylineserver.service.ExamService;
import com.song.studylineserver.util.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/exam/")
public class ExamController {
    @Autowired
    ExamService examService;

    @RequestMapping("save")
    public Result saveExam(@RequestBody Exam body){
        return new Result(200,"添加成功",examService.saveOrUpdate(body));
    }

}
